<div class="view-header">
    
</div>
<div class="view-content set-user-container">
    <div class="set-item-content set-user-content">
        <div class="set-item-row" style="height: 150px;">
            <!-- 用户列表 -->
            <div class="set-user-block set-user-bg-user" ng-click="user.handler.users_open()">
                <div class="set-item-top">
                    <div class="set-user-icon-ranks">
                        <i class="fa fa-bell"></i>
                    </div>
                    <div class="set-item-title">用户列表</div>
                </div>
            </div>
            <!-- 用户权限 -->
            <div class="set-user-block set-user-bg-ranks" ng-click="user_ranks_show()">
                <div class="set-item-top">
                    <div class="set-user-icon-ranks">
                        <i class="fa fa-pie-chart"></i>
                    </div>
                    <div class="set-item-title">分配用户岗位</div>    
                </div>
            </div>
            <!-- 可视门店 -->
            <div class="set-user-block set-user-bg-shop" ng-click="view_shop_handler()">
                <div class="set-item-top">
                    <div class="set-user-icon-ranks">
                        <i class="fa fa-cogs"></i>
                    </div>
                    <div class="set-item-title">用户可视门店</div>    
                </div>
            </div>
        </div>

<!-- 用户 -->
        <div class="set-user-body" ng-show="user.overlay.users">
            <div class="set-user-body-title">
                <div class="set-user-body-title-l" style="width: 25%;">已选中用户</div>
                <div class="set-user-body-title-r" style="width: 75%;">选择需要修改的用户</div>
            </div>
            <div class="set-user-body-content">
                
                
                <div class="set-user-body-list" style="width: 25%;">
                    <div class="set-shop-block" style="background: #578ebe;">
                        <div class="set-shop-icon"><i class="fa fa-user"></i></div>
                        <div class="set-shop-content">
                            <div class="set-shop-item">{{user.user.name}}</div>
                            <div class="set-shop-item">{{user.user._shop.name}}</div>
                            <div class="set-shop-item">{{user.user.tel}}</div>
                        </div>
                    </div>
                    <div class="set-shop-block" style="background: #578ebe;">
                        <div class="set-shop-icon" ng-click="user.handler.new_open()"><i class="fa fa-plus"></i></div>
                        <div class="set-user-new-block" ng-show="user.overlay.new">
                            <div class="set-item-new-line">
                                <input type="text" placeholder="uid" ng-model="user.params.new.uid">
                            </div>
                            <div class="set-item-new-line">
                                <input type="text" placeholder="用户" ng-model="user.params.new.name">
                            </div>
                            <div class="set-item-new-line">
                                <input type="password" placeholder="密码" ng-model="user.params.new.password">
                            </div>
                            <div class="set-item-new-line">
                                <input type="text" placeholder="电话" ng-model="user.params.new.del">
                            </div>
                            <div class="set-item-new-line">
                                <input type="text" placeholder="邮箱" ng-model="user.params.new.email">
                            </div>
                            <div class="set-item-new-line">
                                <select ng-model="user.params.new.sex">
                                    <option value="">性别</option>
                                    <option value="0">男</option>
                                    <option value="1">女</option>
                                </select>
                            </div>
                            <div class="set-item-new-line">
                                <select ng-model="user.params.new.shop_id" ng-options="shop.id as shop.name for shop in user.all_shop">
                                    <option value="">门店</option>
                                </select>
                            </div>
                            <div class="set-item-new-submit">
                                <span ng-click="user.handler.new_submit()">提交</span>
                            </div>
                        </div>
                    </div>
                    <div class="set-shop-block" style="background: #578ebe;">
                        <div class="set-shop-icon" ng-click="user.handler.modify_open()"><i class="fa fa-pencil"></i></div>
                        <div ng-show="user.overlay.modify">
                            <div class="set-item-new-line">
                                <input type="text" placeholder="uid" ng-model="user.params.modify.uid">
                            </div>
                            <div class="set-item-new-line">
                                <input type="text" placeholder="用户" ng-model="user.params.modify.name">
                            </div>
                            <div class="set-item-new-line">
                                <input type="password" placeholder="密码" ng-model="user.params.modify.password">
                            </div>
                            <div class="set-item-new-line">
                                <input type="text" placeholder="电话" ng-model="user.params.modify.del">
                            </div>
                            <div class="set-item-new-line">
                                <input type="text" placeholder="邮箱" ng-model="user.params.modify.email">
                            </div>
                            <div class="set-item-new-line">
                                <select ng-model="user.params.modify.sex">
                                    <option value="">性别</option>
                                    <option value="0">男</option>
                                    <option value="1">女</option>
                                </select>
                            </div>
                            <div class="set-item-new-line">
                                <select ng-model="user.params.modify.shop_id" ng-options="shop.id as shop.name for shop in user.all_shop">
                                    <option value="">门店</option>
                                </select>
                            </div>
                            <div class="set-item-new-submit">
                                <span ng-click="user.handler.new_submit()">提交</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="set-user-body-list" style="width: 75%;">
                    <div class="set-user-group" ng-repeat="shop in all_shop">
                        <div class="set-user-group-title">{{shop[0].shop_name}}</div>
                        <div class="set-user-group-list">
                            <div class="set-user-group-item" ng-repeat="item in shop" ng-click="user.handler.user_item(item)">
                                {{item.name}}
                            </div>
                        </div>
                    </div>
                </div>


            </div>
        </div>
<!-- 用户岗位 -->
        <div class="set-user-body" ng-show="privileges_ovrlay">
            <div class="set-user-body-title">
                <div class="set-user-body-title-l" style="width: 25%;background: #8775a7;">已选中用户</div>
                <div class="set-user-body-title-r" style="width: 75%;background: #8775a7;">位置：分配用户可视门店</div>
            </div>
            <div class="set-user-body-content">
                <div class="set-user-body-list" style="width: 25%;">
                    <div class="set-shop-block" style="background: #8775a7;">
                        <div class="set-shop-icon"><i class="fa fa-user"></i></div>
                        <div class="set-shop-content">
                            <div class="set-shop-item">{{user.user.name}}</div>
                            <div class="set-shop-item">{{user.user._shop.name}}</div>
                            <div class="set-shop-item">{{user.user.tel}}</div>
                        </div>
                    </div>
                </div>
                <div class="set-user-body-handler" style="width: 75%;">
                    <div class="set-item-attach">
                        <div class="set-item-attach-title">未分配岗位</div>
                        <div class="set-item-attach-content">
                            <div class="set-item-attach-item set-user-privileges-item" 
                                ng-repeat="item in cur_user_unassigned_ranks |orderBy:['name'] |filter:ranks_und" 
                                ng-click="add_rank(item)">
                                {{item.name}}
                                <i class="fa fa-plus"></i>
                            </div>
                        </div>
                    </div>
                    <div class="set-item-attach">
                        <div class="set-item-attach-title">已有岗位</div>
                        <div class="set-item-attach-content">
                            <div class="set-item-attach-item set-item-detach-item" 
                                ng-repeat="item in cur_user_assigned_ranks |orderBy:['name'] |filter:ranks_exi" 
                                ng-click="remove_rank(item)">
                                {{item.name}}
                                <i class="fa fa-minus"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
<!-- 可视门店 -->
        <div class="set-user-body" ng-show="view_shop_ovrlay">
            <div class="set-user-body-title">
                <div class="set-user-body-title-l set-user-view-title" style="width: 25%;">已选中用户</div>
                <div class="set-user-body-title-r set-user-view-title" style="width: 75%;">位置：分配用户可视门店</div>
            </div>
            <div class="set-user-body-content">
                <div class="set-user-body-list" style="width: 25%;">
                    <div class="set-shop-block" style="background: #44b6ae;">
                        <div class="set-shop-icon"><i class="fa fa-user"></i></div>
                        <div class="set-shop-content">
                            <div class="set-shop-item">{{user.user.name}}</div>
                            <div class="set-shop-item">{{user.user._shop.name}}</div>
                            <div class="set-shop-item">{{user.user.tel}}</div>
                        </div>
                    </div>
                </div>
                <div class="set-user-body-handler" style="width: 75%;">
                    <div class="set-item-attach">
                        <div class="set-item-attach-title">未分配可视门店</div>
                        <div class="set-item-attach-content">
                            <div class="set-item-attach-item set-user-view-item" 
                                ng-repeat="user_shop_null in user_view_shops_null" 
                                ng-click="view_shop_attach(user_shop_null)">
                                {{user_shop_null}}
                                <i class="fa fa-plus"></i>
                            </div>
                        </div>
                    </div>
                    <div class="set-item-attach">
                        <div class="set-item-attach-title">用户已存在可视门店</div>
                        <div class="set-item-attach-content">
                            <div class="set-item-attach-item set-item-detach-item" 
                                ng-repeat="user_shop in user_view_shops" 
                                ng-click="view_shop_detach(user_shop)">
                                {{user_shop}}
                                <i class="fa fa-minus"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>



    </div>
</div>